/*
 * Wazuh databaseFeedManager
 * Copyright (C) 2015, Wazuh Inc.
 * September 22, 2023.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */
#ifndef _DATABASE_FEED_MANAGER_TEST_H
#define _DATABASE_FEED_MANAGER_TEST_H

#include "../../src/databaseFeedManager/databaseFeedManager.hpp"
#include "TrampolineContentRegister.hpp"
#include "TrampolineIndexerConnector.hpp"
#include "TrampolineOsDataCache.hpp"
#include "TrampolinePolicyManager.hpp"
#include "TrampolineRouterSuscribe.hpp"
#include "rocksDBWrapper.hpp"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <fstream>

/**
 * @brief This test class contains unit tests for the databaseFeedManager module.
 */
class DatabaseFeedManagerTest : public ::testing::Test
{
protected:
    /**
     * @brief Construct a new Database Feed Manager Tests object
     *
     */
    DatabaseFeedManagerTest() = default;

    /**
     * @brief Destroy the Database Feed Manager Tests object
     *
     */
    virtual ~DatabaseFeedManagerTest() = default;

    /**
     * @brief SetUp.
     *
     */
    void SetUp() override;

    /**
     * @brief TearDown.
     *
     */
    void TearDown() override;
};

/**
 * @brief This test class contains unit tests for the DatabaseFeedManagerMessageProcessor module.
 */
class DatabaseFeedManagerMessageProcessorTest : public ::testing::Test
{
protected:
    /**
     * @brief Construct a new DatabaseFeedManagerMessageProcessor object
     *
     */
    DatabaseFeedManagerMessageProcessorTest() = default;

    /**
     * @brief Destroy the DatabaseFeedManagerMessageProcessor object
     *
     */
    virtual ~DatabaseFeedManagerMessageProcessorTest() = default;

    /**
     * @brief SetUp.
     *
     */
    void SetUp() override;

    /**
     * @brief TearDown.
     *
     */
    void TearDown() override;
};

/**
 * @brief This test class contains unit tests for the databaseFeedManager module vendor maps.
 */
class DatabaseFeedManagerVendorMapTest : public ::testing::Test
{
protected:
    /**
     * @brief Construct a new Database Feed Manager Tests object
     *
     */
    DatabaseFeedManagerVendorMapTest() = default;

    /**
     * @brief Destroy the Database Feed Manager Tests object
     *
     */
    virtual ~DatabaseFeedManagerVendorMapTest() = default;

    /**
     * @brief SetUp.
     *
     */
    void SetUp() override;

    /**
     * @brief TearDown.
     *
     */
    void TearDown() override;

    /**
     * @brief DatabaseFeedManager smart pointer.
     *
     */
    std::shared_ptr<TDatabaseFeedManager<TrampolineIndexerConnector,
                                         TrampolinePolicyManager,
                                         TrampolineContentRegister,
                                         TrampolineRouterSubscriber>>
        m_spDatabaseFeedManager;

    /**
     * @brief RocksDBWrapper smart pointer.
     *
     */
    std::unique_ptr<Utils::RocksDBWrapper> m_spRocksDBWrapper;
};

#endif //_DATABASE_FEED_MANAGER_TEST_H
